Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow editor plugins to render without an opened doc #1575

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

trusz
Copy link
Member

@trusz trusz commented Sep 25, 2024

@trusz
Copy link
Member Author

trusz commented Sep 25, 2024

I have trouble with the adds a plugin with a name and a valid URL test in packages/openscd/test/unit/Plugging.test.ts

The problem seems to be that I've added requireDoc: true or requireDoc: false to all plugins configuration in packages/openscd/src/plugins.ts

@trusz
Copy link
Member Author

trusz commented Sep 25, 2024

It got weirder. If I have a default editor plugin that does not require a doc so requireDoc: false, then the test goes through

@trusz
Copy link
Member Author

trusz commented Sep 25, 2024

Next bit of update. Something causes an infinite re-rendering cycle.

@trusz
Copy link
Member Author

trusz commented Sep 25, 2024

The infinite re-rendering is caused by this line https://github.com/openscd/open-scd/blob/main/packages/openscd/src/addons/Layout.ts#L635

image

not yet sure why, but if I remove it no infinite loop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant